The present invention relates to a control system for controlling a plurality of printers, differing from each other in dot density, included in a printing system.
In most cases, a printing system including a plurality of printers differing from each other in dot density and capable of simultaneously operating one or more of the plurality of printers includes an impact wire dot serial printer and a nonimpact page printer.
Generally, the highest dot density of the serial printer is 180 dots per inch and the serial printer generates characters by a dot matrix of 24.times.24, while the highest dot density of the page printer is 240 dots per inch and the page printer generates characters by a dot matrix of 32.times.32. The dot density of either the serial printer or the page printer must be converted to print characters in a format specified by a host system connected to the printing system, namely, in a character size substantially the same as that specified by the host system. Ordinarily, the dot density of the page printer, which, in most cases, is connected additionally to the printing system, is converted. In this case, characters are expressed by dot images formed by a dot matrix, namely, a font pattern.
FIG. 1 is a block diagram of a page printer controlled by a conventional printer control system. In FIG. 1, there are shown a microprocessor 1, a program memory 2, an interface 3 which communicates with a host system, not shown, for exchanging data, a receiving buffer 4 for temporarily storing received data including print data, a prebuffer 5 for storing dot image data included in blocks of print data for printing ruled lines and images, a print control unit 6 for editing the received print data in dot image data according to a printing format, a dot image data memory 7 for storing the dot image data edited by the print control unit 6, a printer interface 8 which controls operation; for reading the dot image data from the dot image memory 7 and transferring the dot image data read from the dot image memory 7, a dot density converting unit 9 for magnifying or reducing a font pattern down-loaded from the host system through the interface 3 and the receiving buffer 4, namely, an external font pattern, and a block of dot image data stored in the prebuffer 5 in conformity with the dot density of the page printer, a resident font memory 10 for storing font patterns which are used frequently as resident fonts, an external font memory 11 for storing an external font pattern magnified or reduced by the dot density converting unit 9, a font memory control unit 12 for address control to assign the external font pattern magnified or reduced by the dot density converting unit 9 to a specified address and for address control to read a specified font pattern from the resident font memory 10 or the external font memory 11 on the basis of a resident font specifying code or an external font specifying code included in the received print data, and a printing unit 13 for printing characters and ruled lines on a sheet on the basis of the dot image data given thereto from the printer interface 8.
In some cases, a system comprising the components 1 to 13 shown in FIG. 1 is regarded as a page printer, while in other cases, only the printing unit 13 is regarded as a page printer and a system comprising the rest of the components 1 to 12 is regarded as an additional controller. In this case, it is assumed that the resident font pattern is formed of a dot matrix of 32.times.32 and the external font pattern is formed of a dot matrix of 24.times.24.
The operation of the page printer shown in FIG. 1 will be described hereinafter with reference to FIG. 2 showing a control program for controlling the page printer. Prior to starting print data reception, the page printer is down-loaded through the interface 3 and the receiving buffer 4 with an external font pattern by the host system, and the external font pattern is stored in the external font memory 11 after being converted into a font pattern of a dot matrix of 32.times.32 matching the print dot density of the printing unit 13 by the dot density converting unit 9.
Print data to be printed out by the page printer is transferred from the host system through the interface 3 to the receiving buffer 4 in step s1. Then, the microprocessor 1 executes the following control program.
A query is made in step s2 to see if a font code included in the print data stored in the receiving buffer 4 is a font code specifying the resident font pattern and, when the response in step s2 is negative, a query is made in step s3 to see if the font code is a font code specifying the external font pattern stored in the external font memory 11. The identification of the font code is made with reference to the first byte of a character code of known binary byte code system.
When the response in step s2 is affirmative, the address of a resident font pattern corresponding to the font code is given to the font memory control unit 12 in step s4. When the response in step s3 is affirmative, the address of the external font pattern corresponding to the font code is given to the font memory control unit 12 in step s5.
At the same time, the microprocessor 1 gives an instruction to the print control unit 6 to edit the font pattern read from the resident font memory 10 or the font pattern read from the external font memory 11 according to codes specifying the character pitch and the line pitch included in the print data. In case the character pitch and the line pitch are expressed in a unit of a dot, the instruction is expressed in a unit of a dot matching the print dot density of the printing unit 13.
The print control unit 6 edits the resident font pattern or the external font pattern in dot image data according to the instruction given thereto from the microprocessor 1, and then stores the dot image data in the dot image memory 7 (steps s6, s7, s8 and s9).
A process for printing a ruled line will be described hereinafter.
FIG. 3 shows ruled line print data 14 for printing a ruled line. The ruled line print data 14 is data of a printing format for one block matching the dot matrix of 24.times.24. The ruled line print data 14 consists of a code ESC, a code J and data n1, n2, n3, n4, d1, d2, d3, . . . The code J indicates that the following ruled line data d1, d2, d3, . . . are dot image data of twenty-four bits along the row direction. The data n1, n2, n3 and n4 represent the length (the number of bits) of the ruled line data d1, d2, d3, . . . along the row direction. The number of bits along the row direction is an optional value not greater than a value indicating the length of the printing range in the direction of the recording sheet. The data d1, d2, d3, . . . are ruled line data (dot image data) 15 of twenty-four dots in the line direction and dots in the row direction. For example, the data d1, d2 and d3 among the ruled line data 15 indicate the contents of three bytes (twenty-four bits) of the dot image data of the first row.
The ruled line print data 14 for one block is transferred from the host system through the interface 3 to the receiving buffer 4.
When the print data stored in the receiving buffer 4 is the ruled line print data 14 (step s10), the microprocessor 1 stores the ruled line data 15 of twenty-four bits in the line direction and bits in the row direction in the prebuffer 5 (step s11). The ruled line data 14 is identified by the codes ESC and J.
When the ruled line data 15 for one block is stored in the prebuffer 5, namely, when the response in step s12 is affirmative, the dot density converting unit 9 converts the ruled line data 15 into dot image data matching the print dot density of the printing unit 13 (step s13), and then the microprocessor 1 gives an instruction to the print control unit 6 to store the converted dot image data in the dot image memory 7 (step s14).
FIG. 4 shows the details of the ruled line data 15 for one block for the serial printer of a 24.times.24 dot matrix, and ruled line data 16 for one block for the page printer of a 32.times.32 dot matrix produced by converting the ruled line data 15. The dot image data of twenty-four dots of a dot pitch of 1/180 in. in the line direction is converted into the dot image data of thirty-two dots of a dot pitch of 1/240 in. in the line direction, and the dot image data of dots of a dot pitch of 1/180 in. in the row direction is converted into the dot image data of 4 /3 dots of a dot pitch of 1/240 in. in the row direction.
Thus, the ruled line data is subjected to dot density conversion in blocks and the converted dot image data is written in the dot image memory 7. This procedure is repeated until all the ruled line data for one page is stored in the dot image memory 7 (step s15). Naturally, the print control unit 6 superposes the previously stored character data and the ruled line data in storing data.
After all the ruled line data for one page has been thus stored, the printer interface 8 reads the dot image data from the dot image memory 7 upon the reception of an instruction from the microprocessor 1 and transmits the dot image data to the printing unit 13 to print the dot image data (step s16).
FIG. 5 shows an example of printed ruled lines. In FIG. 5, indicated at 17 is a recording sheet, at 18 is the origin of the recording sheet 17, at 19 are ruled lines, at A is the distance from the origin 18 to the first ruled line in the row direction, at B are intervals between the ruled lines in the row direction, and at C are intervals between the ruled lines in the line direction.
Suppose that A=31 dots (31/180 in.), B=180 dots (180/180 in.=1 in.) and C=60 dots (60/180 in.=1/3 in.) in the ruled line data for the serial printer of a 1/180 in. dot pitch transmitted from the host system. Then, the converted ruled line data for the page printer of a 1/240 in. dot pitch must be 41 dots (31.times.4/3=41.333) in A, 240 dots (180.times.4/3=240) in B, and 80 dots (60.times.4/3=80) in C.
However, in some cases, the position of the ruled lines with respect to the row direction deviates from a correct position depending on the number of dots in the row direction of the ruled line data included in the ruled line print data for one block, because the conversion ratio: (1/180 in.)/(1/240 in.)=4/3 (1.333 . . . ) is not an integer.
Suppose that the host system provided ruled line print data for two blocks, for example, ruled line print data for one block including ruled line data of twenty-nine dots in the row direction for the distance A and ruled line print data for another block including ruled line data of two dots in the row direction successive to the twenty-nine dots. The ruled line data of twenty-nine dots in the row direction is converted into ruled line data of thirty-nine dots (29.times.4/3=38.666 . . . ) and the ruled line data of two dots in the row direction is converted into ruled line data of three dots (2.times.4/3=2.666 . . . ). Thus, ruled line data of thirty-one dots (29+2) included in the ruled line print data for the two blocks provided by the host system is converted into ruled line data of forty-two dots in total.
FIG. 6 shows printed ruled lines, in which the ruled line data of the distance A for the first line was given in the ruled line print data for one block, and the ruled line data of the distance A for the second line was given in the ruled line print data for two blocks.
Thus, the conventional printer control system unavoidably causes the printing position of the ruled line to be dislocated from a correct position depending on the number of dots in the row direction of row of the ruled line data included in the ruled line print data provided by the host system.